package com.example.junit;

import com.example.sao.UserSao;
import com.example.junit.service.impl.LoginServiceImpl;
import com.example.junit.service.impl.UserServiceImpl;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/login")
public class LoginController {

    @Resource
    private LoginServiceImpl loginService;

    @Resource
    private UserServiceImpl userService;

    @Resource
    private UserSao userSao;

    @RequestMapping("/say")
    @ResponseBody
    public Object say() {


        log.info(loginService.test());
        log.info(userSao.getUserById());

        return "hello" + System.currentTimeMillis();
    }
}
